import { request } from '@/utils/request'

// export function filterSpareDevice(data, callback) {
//     return request({
//         url: "/spare_part/filter_device",
//         method: "get",
//         data,
//         isYarn: true,
//     }, callback);
// }

// export function checkSparePart(data, callback) {
//     return request({
//         url: "/spare_part/check",
//         method: "post",
//         data,
//         isYarn: true,
//         type: "json"
//     }, callback);
// }

// export function cancelApplyForSparePart(data, callback) {
//     return request({
//         url: "/spare_part/cancel_apply_for",
//         method: "post",
//         data,
//         isYarn: true,
//         isFile: true,
//     }, callback)
// }

// export function loadFeedPlanDetail(data, callBack) {
//     return request({
//         url: "/feed_plan/detail",
//         method: 'get',
//         data,
//         isYarn: true,
//         isId: true,
//     }, callBack);
// }

/* 盘头具体详情 */
export function queryCraftDetail(data, callback) {
    return request({
        url: "/weaving_craft_multi/craft_detail",
        method: "get",
        data,
        isYarn: true,
    }, callback);
}

/* 坯布详情 */
export function queryGreyClothDetail(data, callback) {
    return request({
        url: "/weaving_grey_cloth_multi/detail",
        method: "get",
        data,
        isYarn: true,
        isId: true
    }, callback);
}

/* 坯布试样分段 */
export function loadGreyClothSampleData(data, callback) {
    return request({
        url: "/weaving_grey_cloth_multi/list_sample_by_grey_cloth",
        method: "get",
        data,
        isYarn: true,
    }, callback);
}

/* 加载织造机器 */
export function loadWeavingMachineData(data, callback) {
    return request({
        url: "/maintenance/machine_nos",
        method: "get",
        data,
        isYarn: true,
    }, callback);
}

/* 盘头所用纱线ID */
export function loadYarn4Craft(data, callback) {
    return request({
        url: "/weaving_craft_multi/list_yarn_4_craft",
        method: "get",
        data,
        isYarn: true,
    }, callback);
}

/* 增加发纱 */
export function addDistributeYarn(data, callback) {
    return request({
        url: "/weaving_craft_multi/distribute_yarn",
        method: "post",
        data,
        isYarn: true,
        type: "json"
    }, callback);
}

/* 盘头所用纱线ID */
export function loadCraftYarn(data, callback) {
    return request({
        url: "/weaving_craft_multi/list_craft_yarn",
        method: "get",
        data,
        isYarn: true,
    }, callback);
}

/* 盘头所用纱线ID */
export function delCraftYarn(data, callback) {
    return request({
        url: "/weaving_craft_multi/del_craft_yarn",
        method: "post",
        data,
        isYarn: true,
        isFile: true,
    }, callback);
}